package _14define._10homework;

public class Car {
    private String brand;
    private double price;
    private String model;

    public Car(String brand, double price, String model) {
        this.brand = brand;
        this.price = price;
        this.model = model;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }
    void startEngine(){
        Engine engine=new Engine();
        engine.run();
    }
    class Engine{
        void run(){
            System.out.println("品牌:"+brand+" 价格:"+price+" 型号:"+model);
            System.out.println("发动机已启动");
        }
    }
}
